
<template>
	<view>
		<PersonalBase v-if="currentIndex===1" @next="handleNext"></PersonalBase>
		<PersonalImage v-if="currentIndex===2" @next="handleNext"></PersonalImage>
		<PersonalLife v-if="currentIndex===3" @next="handleNext"></PersonalLife>
		<PersonalRecord v-show="currentIndex===4" @next="handleNext"></PersonalRecord>
	</view>
</template>

<script>
	import PersonalBase from './personal-base.vue'
	import PersonalImage from './personal-image.vue'
	import PersonalLife from './personal-life.vue'
	import PersonalRecord from './personal-record.vue'
	import {
		authStepsDetails,
		identityAuth
	} from "@/api/mine/auth.js"
	export default {
		props:{
			current:{
				default:1,
				type:Number
			}
		},
		components: {
			PersonalBase,
			PersonalImage,
			PersonalLife,
			PersonalRecord
		},
		data() {
			return {
				currentIndex:1
			}
		},
		watch:{
			current:{
				immediate:true,
				handler(val){
					this.currentIndex = this.current
				}
			}
			
		},
		methods: {
			handleNext(index) {
				if (index) {
					if (index === 5) {
						this.$emit('confirm', 3)
					} else {
						this.currentIndex = index
					}
				} else {
					this.$emit('confirm', 1)
				}
			},
			handleGetRecordForm(form) {
				this.recordForm = form
			},
			handleGetLifeForm(form) {
				this.lifeForm = form
			},
			handleGetImageForm(form) {
				this.imageForm = form
			},
			handleGetBaseForm(form) {
				this.baseForm = form
			},

		}
	}
</script>

<style scoped lang="scss">
</style>